{% load i18n %}
{% regroup dates by year as dates_by_year %}

<ul class="small-block-grid-1 large-block-grid-1">
{% for month in dates_by_year %}
<li id="year{{ month.grouper }}"{% if forloop.first %} class="active"{% endif %}>
  <h4><a href="{% url 'weblog:archive-year' month.grouper %}">{{ month.grouper }}</a> <i class="collapsing-icon icon icon-plus"></i></h4>
  <div class="collapsing-content">
    <ul class="list-links-small">
      {% for d in month.list %}
        <li><a href="{% language "en" %}{% url 'weblog:archive-month' d|date:"Y" d|date:"b" %}{% endlanguage %}">{{ d|date:"F Y" }}</a></li>
      {% endfor %}
    </ul>
    <p></p>
  </div>
</li>
{% endfor %}
</ul>
